<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var arr = [8, 4, 1, 3, 9, 3, 7, 5]
        var index = [2, 0, 3, 4, 6, 1, 3, 7, 3, 3, 2]
        var tell ="";
        for (let i = 0; i < index.length; i++) {
            const I = index[i];
            // console.log(arr[I])
            tell += arr[I];
            // console.log(tell)
        }
        // console.log(tell)
    </script>
</body>

</html>